1. Coordinate Systems

b. Distance Formula - 2D, 3D and nD

1. Distance Formula in 2D

Recall the Pythagorean Theorem:

If the legs of a triangle are \(a\) and \(b\), and the hypotenuse is \(c\), then \[ c=\sqrt{a^2+b^2} \]

We can use the Pythagorean Theorem to find the distance between two points in the plane. Consider two points \(P=(p_1,p_2)\) and \(Q=(q_1,q_2)\) as shown: The difference in the \(x\)-coordinates is \(|q_1-p_1|\) and the difference in the \(y\)-coordinates is \(|q_2-p_2|\). These are the two legs of a right triangle whose hypotenuse is the distance between the points \(P\) and \(Q\). Consequently, by the Pythagorean Theorem, we conclude:

def_2DDist

The distance between the points \(P=(p_1,p_2)\) and \(Q=(q_1,q_2)\) is: \[ d(P,Q)=\sqrt{(q_1-p_1)^2+(q_2-p_2)^2} \]

Find the distance between the points \(A=(5,2)\) and \(B=(-3,8)\)

\(d(A,B)=10\)

The distance between \(A=(5,2)\) and \(B=(-3,8)\) is: \[\begin{aligned} d(A,B)&=\sqrt{(b_1-a_1)^2+(b_2-a_2)^2} \\ &=\sqrt{(-3-5)^2+(8-2)^2} \\ &=\sqrt{64+36}=10 \end{aligned}\]

ex_2DDist

You can also use the two Maplets below for practice with the Pythagorean Theorem and finding the distance between two points in the plane (requires Maple on the computer where this is executed):

Pythagorean Theorem PracticeRate It

Distance Between Two PointsRate It

Equation of a Circle

By definition, the circle of radius \(r\) centered at a point \(C=(a,b)\) is the set of all points \(X=(x,y)\) whose distance from \(C\) is \(r\). Using the distance formula, this circle is the set of all points \(X=(x,y)\) satisfying the equation \[ d(C,X)=r \] or \[ \sqrt{(x-a)^2+(y-b)^2}=r \]

The circle of radius \(r\) centered at a point \(C=(a,b)\) is: \[ (x-a)^2+(y-b)^2=r^2 \]

Find the equation of the circle centered at \(P=(-3,8)\) which is tangent to the \(x\)-axis.

Draw a picture. What is the distance from \(P=(-3,8)\) to the \(x\)-axis?

\((x+3)^2+(y-8)^2=64\)

The distance from \(P=(-3,8)\) to the \(x\)-axis is \(8\), the \(y\) coordinate of \(P\). This is the radius. So the circle is \((x+3)^2+(y-8)^2=64\).

ex_circ_tan_to_xaxis

Some exercises on circles use the fact that the center of a circle is at the midpoint of a diameter.

Midpoint of a Line Segment

The midpoint of a line segment is the point halfway between the endpoints. So its coordinates are found by averaging the coordinates of its endpoints. Specifically,

If the endpoints of a line segment are \(P=(a,b)\) and \(Q=(c,d)\), then the midpoint is: \[ M=\left(\dfrac{a+c}{2}, \dfrac{b+d}{2} \right). \]

Find the equation of the circle which has a diameter with endpoints \(P=(-2,3)\) and \(Q=(4,7)\).

The center is at the midpoint of the line segment between \(P=(-2,3)\) and \(Q=(4,7)\). The radius is half of the diameter.

\((x-1)^2+(y-5)^2=13\)

The center of the circle is at the midpoint of the line segment between \(P=(-2,3)\) and \(Q=(4,7)\) which is found by averaging their coordinates: \[ C=\left(\dfrac{-2+4}{2}, \dfrac{3+7}{2} \right)=(1,5) \] The radius of the circle is half of the distance between \(P\) and \(Q\). This distance is \[ d(P,Q)=\sqrt{(4--2)^2+(7-3)^2}=2\sqrt{13} \]

ex_circ_from_diam

and so, the radius is \(r=\sqrt{13}\). So the equation of the circle is: \[ (x-1)^2+(y-5)^2=13 \]

You can also practice computing the midpoint of a line segment using the following Maplet (requires Maple on the computer where this is executed):

Midpoint of the Line Segment Between Two Points in 2DRate It

© MYMathApps

Supported in part by NSF Grant #1123255